package com.cqjtu.store.order.mapper;

import com.cqjtu.store.common.PageDTO;
import com.cqjtu.store.order.pojo.dto.OrderSearchDTO;
import com.cqjtu.store.order.pojo.entity.Order;
import com.cqjtu.store.order.pojo.vo.OrderVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderMapper {

    List<OrderVO> getOrderList(@Param("userId") Integer userId, @Param("status") Integer status);

    List<OrderVO> getOrderList1(@Param("userId") Integer userId, @Param("OrderId")Integer OrderId, @Param("status") Integer status);

    int receive(@Param("oid") Integer oid, @Param("status") Integer status);

    Order getOrderById(Integer id);

    int add(Order order);

    int editStatus(@Param("status") Integer status, @Param("oid") Integer oid);

    int update(Order order);

    List<Order> getAllOrderListByPage(PageDTO pageDTO);

    int count();

    Integer getTotal();

    int updateIsDelete(Integer id);

    List<Order> getSomeOrderListByPage(OrderSearchDTO orderSearchDTO);
}
